package net.xdclass.service;

import net.xdclass.model.CouponRecordMessage;
import net.xdclass.request.LockCouponRecordRequest;
import net.xdclass.util.JsonData;
import net.xdclass.vo.CouponRecordVO;

import java.util.Map;

/**
 * @author : zhen.xue
 * @date : 2021-05-26 17:50
 */
public interface CouponRecordService {


    /**
     * 分页查询领券信息
     * @param page
     * @param size
     * @return
     */
    Map<String,Object> page(int page,int size);


    /**
     * 查询优惠券记录详情
     * @param recordId
     * @return
     */
    CouponRecordVO findById(long recordId);

    /**
     * 锁定优惠券
     * @param lockCouponRecord
     * @return
     */
    JsonData lockCouponRecords(LockCouponRecordRequest lockCouponRecord);

    /**
     * 释放优惠券记录
     * @param recordMessage
     * @return
     */
    boolean releaseCouponRecord(CouponRecordMessage recordMessage);
}